<!-- template to simulate a SharePoint 2010 list -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>Camelot PHP Tools List Demo - 2010 Template</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="../templates/css/SharePointDocLib.css" type="text/css" />
        <style type="text/css">

            table,tbody,thead {
                padding: 0;
                margin: 0;
                text-align: left;
            }

        </style>
    </head>
    <body>
        <form method="POST" action="?" enctype="multipart/form-data">
            <input type="hidden" name="parentId" value="{{ parent_id }}" />
            ﻿<div id="toolbar" class="toolbar" >
                <ul id="toolbarItems" >
                    <li><span>Toolbar</span></li>
                    <li class="separator"></li>
                    <li id="Container_ddlSiteDocLibs" >
                        <select id="﻿ddlSiteDocLibs" name="﻿ddlSiteDocLibs" onchange="this.form.submit();">
                            <option></option>
                            {% for item in document_libraries %}
                            <option value="{{ item.title }}" {% if document_library_name == item.title %} selected="selected" {% endif %}>{{ item.title }}</option>
                            {% endfor %}
                        </select>                    
                    </li>
                    <li class="separator"></li>
                    <li id="Container_btnReload" ><a href="?action=reload"><img src="../templates/images/icons/reload_32.png" Width="16" Height="16" border="0" /></a></li>
                    {% if show_new_folder_control %}
                    <li id="Container_btnNewFolder" >
                        {% if create_folder %}
                        <a href="?"><img src="../templates/images/sharepoint/folder_trimmed.png" Width="15" Height="12" border="0" /></a>
                        {% else %}
                        <a href="?{{ create_folder_url }}"><img src="../templates/images/sharepoint/folder_trimmed.png" Width="15" Height="12" border="0" /></a>
                        {% endif %}
                    </li>
                    {% endif %}
                    {% if show_upload_controls %}
                    <li class="separator"></li>
                    <li id="Container_uploadButton" ><input type="submit" value="Upload" /></li>
                    <li id="Container_fileUpload" ><input type="file" name="file" id="file" /></li>
                    {% endif %}
                </ul>
            </div>

            {% if create_folder %}
            ﻿<div id="newFolderContainer">
                <input type="text" id="txtNewFolder" name="txtNewFolder" />
                <input type="submit" value="Create Folder" />
            </div>
            {% endif %}

        </form>

        <table style="border: 0px solid #fff;" class="toolbarTable">
            <tr>
                <th>{% if root_level  %}<a id="_back" href="?parentId={{ tree_parent_id }}"><img src="../templates/images/icons/arrow_up_32.png" Width="16" Height="16" alt="Navigate Up" border="0" style="border: 0px;" /></a>{% endif %}</th>
                <th>Name</th>
                <th>Modified</th>
                <th>Size</th>
                <th>Kind</th>
            </tr>

            
            {% for item in files_folders %}
            <tr class="{{ cycle(['tr_odd', 'tr_even'], loop.index) }}">
                <td><img src="../templates/images/sharepoint/{{ item.ContentType }}.gif" border="0" alt=""/></td>
                {% if item.ContentType == 'Folder' %}
                    <td><a href='?parentId={{ item.Id }}'>{{ item.BaseName }}</a><br /></td>
                {% else %}
                    <td><a href='?{{ item.UrlPrefix }}download={{ item.FolderPath }}{{ item.LinkFilename }}{{ item.UrlSuffix }}'>{{ item.LinkFilename }}</a></td>
                {% endif %}
                <td>{{ item.Modified }}</td>
                <td>{{ item.FileSize }}</td>
                <td>{{ item.FileType }}</td>
            </tr>
            {% endfor %}
        </table>
    </body>
</html>